const connect = require('connect');
const expressSession = require('express-session');
const csurf = require('csurf');

connect()
  .use(expressSession({ secret: 'secret' }))
  .use(csurf())
  .use(function (req, res, next) {
    res.write(req.session.csrfSecret);
    res.end();
  })
  .listen(3000);
